<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="myCommon.js"></script>
    <style>
        #box {
            background-color: green;
            width: 100px;
            height: 200px;
            position: absolute;
        }
    </style>
</head>
<body>
<div id="box"></div>
<input type="button" id="btn" value="点我">
<script>
    var box = $('box');
    //
    //console.log(box);
    //非IE下运行
//    var cssObj = window.getComputedStyle(box);
//    alert(cssObj.width);

    //在IE下运行
//    var cssOjb = box.currentStyle;
//    alert(cssOjb.width);




   var o = getCssObj(box);
    var w = getCssObjAttr(box,'width');
    var pos = getCssObjAttr(box,'position');
    console.log(w);
    console.log(pos);


</script>

</body>
</html>